home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sun.admin,news.sysadmin,news.admin,comp.unix.admin
- From: harker@harker.com (Robert Harker)
- Subject: Setting up security on a Sun workstation
- Message-ID: <1992Mar14.004545.8052@harker.com>
- Keywords: security sun shadow passwd cops 4.1.2
- Organization: Harker Systems, 1180 Hester Ave, San Jose, CA 95126
- Date: Sat, 14 Mar 1992 00:45:45 GMT
-
-
- The following suggestions are the recommendations I make in terms of
- setting up "reasonable" security on a network of sun machines, either a
- corporate private network or on an Internet connected network
- Many of the suggestions are taken from previous postings and things I have
- read; thanks in advance to those authors. What I have tried to do is
- collect many of the security patches or suggestions that I have seen in to a
- single document. If you have other suggestions or see any mistakes, please
- send them to me.
-
- I am making the assumption that the site wants to run NIS, but may be working
- with the Domain Name Service. If you have security related reasons not to run
- NIS I would like to hear them (I do not want to hear pro-DNS arguments) If
- there are additional precautions I should be taking because I run NIS, please
- send me mail.
-
- Thanks in advance
- RLH
-
- Robert Harker 3/13/92
- Sun System Administration and Networking Consulting
- harker@harker.com
-
- The steps I recommend are:
-
- Upgrade all of Sun servers and workstations to SunOS 4.1.2.
- SunOS 4.1.2 is a maintenance release which fixes many bugs (over 600)
- Many of the bugs are security related.
- The following security patches are still needed for SunOS 4.1.2:
- Patch 100103-10 (file permissions)
- Patch 100296-02 (too-long exports lines)
- Patch 100383-03 (rdist)
- Patch 100448 (for OW3.0)
-
- Fix miscellaneous security problems
- Comment out the sync account's password by placing a * in the password field
- Set the correct umask for root and the daemons by putting a umask 022 command
- in /etc/rc after the PATH= and HOME= lines
- In the /etc/rc.local file change the permission that /etc/motd gets set to
- by changing the line: "chmod 666 /etc/motd" to "chmod 644 /etc/motd"
- Use NIS netgroups in the /etc/passwd, /etc/exports, and /etc/hosts.equiv files
-
- Improve password security
- UNIX password security is the first and most powerful line of defense
- Password security on Sun machines can be improved by the follow:
- Move the NIS master text files to a secure directory
- Make /var/yp/src, chown root, and chmod 700
- Change value of DIR= in /var/yp/Makefile to DIR=/var/yp/src
- Copy the master text files to /var/yp/src
- Setup passwd and group as NIS client files, remove /etc/netgroup
- Implement shadow password and group files
- Instructions for implement shadow passwords is available via FTP from
- blacks.jpl.nasa.gov in pub/shadow
- A Sun C2 patch may still be required to make yppasswd work correctly
- Use the npasswd utility which check new passwords for poor choices
- A version of npasswd which has been modified to support C2 and NIS
- better is available via FTP from blacks.jpl.nasa.gov in pub/security
- Run a password cracking program such as crack to check for poor passwords
- crack is available via FTP from blacks.jpl.nasa.gov in pub/crack
-
- Restrict Access to the Encrypted Password Information
- Another way to improve password security is to restrict who has access to
- the encrypted password information.
- If a cracker can get your /etc/passwd information with the encrypted password,
- the (s)he can use a password cracking program on a remote (powerful)
- host to test guessed passwords against each password entry
- Shadow password and group files protect the encrypted password information
- Use a patched version of ypserv which restricts which NIS clients can bind
- to the NIS domain and extract information
- Alain Brossard's patched ypserv is available via FTP from
- ltisun.epfl.ch in pub/nis.patch.no.libc-01.tar.Z
-
- Run a security auditing tool
- The COPS program is a very good tool for checking your system security.
- It checks the basic security permissions and ownerships on a system.
- When you install it, spend the time to correct the security problems it finds
- You want the normal output of cops to be clean or as short as possible.
- Have COPS run weekly or daily and have the results monitored by
- a specific person
- COPS is available vi anonymous FTP from cert.sei.cmu.edu
-
- Protect Superuser Access
- Do not allow direct root logins
- Only terminals marked as secure in the /etc/ttytab file will any user with
- UID = 0 be allowed to login directly
- All other terminals the user will need to login as a normal user and then su
- to root
- Marking terminals as unsecure is a good idea, although not necessary
- /etc/ttytab:
- # name getty type status
- console "/usr/etc/getty std.9600" sun on local unsecure
- ttya "/usr/etc/getty std.9600" vt100 off local unsecure
- ttyd0 "/usr/etc/getty std.19200" dialup on unsecure
- tty00 "/usr/etc/getty std.9600" unknown off local unsecure
- ttyp0 none network off unsecure
-
- Limit the users who are allowed to su to root
- If in the /etc/group file or NIS map the wheel group (group 0) is not a null
- user list, only the members listed are allowed to su to root, all other
- users will be denied, even when they enter the correct root password
-
- Log and monitor su activity
- su information can be logged in a separate file by editing /etc/syslog.conf
- /etc/syslog.conf:
- # To log all un-successful, su failed, and root logins to a local file
- auth.notice /var/log/authlog
- # To send only su failed, and root logins to the loghost machine
- auth.warning ifdef(`LOGHOST', /var/log/authlog, @loghost)
- On a regular basis monitor the su log by looking at the file, or having it
- mailed to you
-
- On hosts connected to the Internet you might want to use the following:
- tcp_wrapper (tcpw) which logs all network requests to specific
- well known services
- tcp_wrapper is is available vi anonymous FTP from cert.sei.cmu.edu
-
- There is a improved FTP daemon which has logging and many other features which
- should be installed if you are going to have an anonymous FTP archive
- machine
- This version of FTP is available vi
- anonymous FTP from wuarchive.wustl.edu in /packages/ftpd.wuarchive.shar
-
- William LeFebvre has developed an package, securelib, which allows an access
- control list to be created for socket bind requests from remote hosts.
- securelib has libc replacements for the socket functions accept, recvfrom, and
- recvmsg which are installed in your libc.so shared library.
- securelib: securing network services under SunOS from eecs.nwu.edu" in
- "pub/securelib.tar"
- This package is still in Beta test, so only use if if you really need to
-
-
- Robert Harker 3/13/92
- Harker Systems Sun Sysadmin Consulting
- harker@harker.com 1180 Hester Ave
- apple!motcsd!harker!harker San Jose, CA 95126
- uunet!harker!harker 408-295-9432
-
-
-